package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func main() {
	inputFile, err := os.Open("input.dat")
	if err != nil {
		fmt.Printf("An error occurred on opening the inputfile\n" +
			"Does the file exist?\n" +
			"Have you got acces to it?\n")
		return
	}

	defer inputFile.Close()

	reader := bufio.NewReader(inputFile)

	for {
		inputString, ioErr := reader.ReadString('\n')
		fmt.Printf("The input was: %s", inputString)
		if ioErr == io.EOF {
			return
		}
	}

}
